<template>
  <div class="news_cell">
    <div class="avatar">
      <nuxt-link :to="`/news/${info.id}`">
        <li-image
          :src="$getLogo(info.photograph)"
          class="img"
          v-if="info.photograph"
        />
        <img src="@/assets/images/home/goods.png" class="img" alt="" v-else />
      </nuxt-link>
    </div>

    <div class="info">
      <div class="title">
        <h2 class="h2">
          <nuxt-link :to="`/news/${info.id}`">{{ info.articleName }}</nuxt-link>
        </h2>
        <h3 class="h3">
          {{ info.introduce }}
        </h3>
      </div>
      <div class="footer">
        <span class="author">{{ info.articleAuthor }}</span>
        <span class="time">{{ info.createdDate }}</span>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  name: "ListNews",
  props: {
    info: {
      type: Object,
      default: function () {
        return {};
      },
    },
  },
  data() {
    return {};
  },
  methods: {
    // 查看详情
    lookDetail() {
      let o = this.info;
      let query = this.$route.query;
      query.id = o.id;
      this.$router.push({
        path: "/news/detail",
        query: { ...query },
      });
    },
  },
};
</script>
<style lang="less" scoped>
@import "./index.less";
</style>